/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package be.hogent.designpatterns.billenkar;

import be.hogent.designpatterns.billenkar.decorators.BillenkarDecorator;

/**
 *
 * @author Jeroen
 */
public class BillenkarGarage {

    public Billenkar repareerBillenkar(Billenkar kar) {
        Billenkar basisKar = kar;
        if(kar instanceof BillenkarDecorator) {
            //Hij is gedecoreerd met krassen enzo, repareren die handel!
            basisKar = ((BillenkarDecorator)kar).getBasisKar();
        }
        return basisKar;
    }

}
